package com.geek.game.manager.agent;

import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.sql.DataSource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.datasource.embedded.DataSourceFactory;
import org.springframework.web.context.ContextLoaderListener;

import com.geek.game.manager.agent.base.mvc.RequestMethod;
import com.geek.game.manager.agent.model.ApplicationForm;
import com.geek.game.manager.agent.model.ConsumerRecord;
import com.geek.game.manager.agent.model.LimitedType;
import com.mchange.v2.c3p0.ComboPooledDataSource;

import ydh.cicada.dao.JdbcDao;
import ydh.cicada.query.factory.MysqlQueryFactory;
import ydh.cicada.query.factory.QueryFactory;
import ydh.cicada.service.CommonService;
import ydh.cicada.utils.EntityUtils;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) throws UnsupportedEncodingException
    {
    	ApplicationContext context=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
    	org.springframework.web.context.ContextLoaderListener listener=new ContextLoaderListener();
        ConsumerRecord record=new ConsumerRecord();
        JdbcDao dao=context.getBean(JdbcDao.class);
        record.setConsumerId("1111");
        record.setConsumeTime(new Date());
        record.setCostId("2075");
        record.setOrderMoney("4");
        record.setRoomId("6666");
        dao.insert(record);
        System.err.println("新增完成");
    }
    
}
